package io.github.common.entity.req;


import com.fasterxml.jackson.annotation.JsonFormat;
import io.github.common.enums.Deleted;

import javax.validation.constraints.NotNull;

import io.github.common.valida.UpdateGroup;
import lombok.Data;

import java.util.Date;

/**
 * 抽象请求体
 *
 * @author haijun
 * @version 1.0.0
 * @email "1424132610@qq.com"
 * @date 2024.10.19 12:32
 * @since 1.0.0
 */
@Data
public abstract class AbstractReq {

    /**
     * Id
     */
    @NotNull(groups = UpdateGroup.class)
    private Long id;

    /**
     * 页数
     */
    private Integer page = 1;

    /**
     * 条数
     */
    private Integer size = 10;

    /**
     * Create time
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    /**
     * Update time
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;
}
